﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
using System.Data.SqlClient;
using Quanlybanhang_pro202.Module;


namespace Quanlybanhang_pro202.Control
{
    class Hoadon_control
    {
        public DataSet GetAllInvoices()
        {
            Hoadon hd = new Hoadon();
            return hd.GetAllInvoices();
        }
        public int InsertInvoice(string thungan, string ngay)
        {
            Hoadon hd = new Hoadon();
            hd.InsertInvoice(thungan, ngay);
            return 1;

        }
        public int UpdateInvoice(string mahoadon, string thungan, int mahk, string ngay)
        {
            Hoadon hd = new Hoadon();
            hd.UpdateInvoices(mahoadon, thungan, mahk, ngay);
            return 1;
        }
        public int DeleteHoadon(string mahoadon)
        {
            Hoadon hd = new Hoadon();
            hd.DeleteInvoice(mahoadon);
            return 1;
        }


    }
}
